#pragma once

#include "AEState.hpp"
#include "AEStateListener.hpp"

BEGIN_ARETE_NAMESPACE(core)

class AEStateManager
	: public components::AEStateListener
{
public:
	AEStateManager(void);
	virtual ~AEStateManager(void);

	void initialize(void);

	bool createState(std::shared_ptr<components::AEState>,const string&);
	bool setActive(const string&);
	bool removeState(const string&);

	components::AEState* getActiveState(void);
	components::AEState* getState(const string&);

private:
	Ogre::map<string,std::shared_ptr<components::AEState>>::type m_inactive_states;
	std::pair<string,std::shared_ptr<components::AEState>> m_active_state;
};

END_ARETE_NAMESPACE